#Copyright (c) 2003 - 2012 Roberto Rodriguez

#This program is free software; you can redistribute it and/or modify
#it under the terms of version 2 of the GNU General Public License
#as published by the Free Software Foundation.

#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.

#You should have received a copy of the GNU General Public License along
#with this program; if not, write to the Free Software Foundation, Inc.,
#51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

cd `pwd`/$(dirname $0)
source scripts/tools.sh
source scripts/vars.sh
function  usage {
echo ""
echo ""
echo "RYMOS build.sh help"
echo "	--clean     Delete the extracted documents and the temporary files."
echo "	--getfiles  Download the need files."
echo "	--help      Display this info"
echo ""
echo ""
exit 1 #exit shell script
}
function  clean {
source scripts/clean.sh
exit 1 #exit shell script
}
function  getfiles {
source scripts/getfiles.sh
exit 1 #exit shell script
}
function libc {
source scripts/clean.sh
source scripts/compile_libc.sh
source scripts/clean.sh
exit 1 #exit shell script
}
for arg in $@; do
		case $arg in
				--clean)  clean;;
				--getfiles) getfiles;;
				--help) usage;;
				--libc) libc;;
		esac
done

#mkdir -p $CROSSCOMP
#source scripts/clean.sh
#source scripts/extract.sh
#source scripts/patch.sh
#source scripts/compile_binutils.sh
#source scripts/compile_gmp.sh
#source scripts/compile_mpfr.sh
#source scripts/compile_mpc.sh
#source scripts/compile_gcc.sh
#source scripts/compile_libc.sh
source scripts/compile_libstdc++-v3.sh
#source scripts/clean.sh

